<?php

namespace App\Master\Framework\Extend;

use App\Models\Admin\Framework\AdminSetupModel;
use Illuminate\Support\Facades\Cache;

class Module
{
    public static function _SetupModule($tables)
    {
        return Cache::remember('ADMIN_SETUP_' . $tables, 0, function () use ($tables) {
            $value = AdminSetupModel::query()->where('table', $tables)->value('value');
            return json_decode($value ?: '{}', true);
        });
    }
}